From 25df6829ebc3eeeb56c6cea8a3376d510581d7b3 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Sat, 3 Dec 2005 10:44:01 +0100 Subject: [PATCH] Using a slow serial console with sync_console on SMP leaves an unusable system: it gets into a flood of Timer ISR/0: Time went backwards: delta=-3566279 cpu_delta=16433721 shadow=2019998373 off=420435384 processed=2444000000 cpu_processed=2424000000 0: 2424000000 1: 2444000000 messages which swamps the console and leaves things almost, but not quite, completely hung. It is a simple matter to ratelimit these printks, which completely eliminates the problem. --- linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c b/linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c index 915f7f033a..88034beac3 100644 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c @@ -560,7 +560,8 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) } while (!time_values_up_to_date(cpu)); - if (unlikely(delta < -1000000LL) || unlikely(delta_cpu < 0)) { + if ((unlikely(delta < -1000000LL) || unlikely(delta_cpu < 0)) + && printk_ratelimit()) { printk("Timer ISR/%d: Time went backwards: " "delta=%lld cpu_delta=%lld shadow=%lld " "off=%lld processed=%lld cpu_processed=%lld\n", -- 2.30.2